x86/nvmx: only update SVI when using Ack on exit
authorRoger Pau Monné <roger.pau@citrix.com>
Thu, 26 Mar 2020 11:25:40 +0000 (12:25 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 26 Mar 2020 11:25:40 +0000 (12:25 +0100)
Check whether there's a valid interrupt in VM_EXIT_INTR_INFO in order
to decide whether to update SVI in nvmx_update_apicv. If Ack on exit
is not being used VM_EXIT_INTR_INFO won't have a valid interrupt and
hence SVI shouldn't be updated to signal the interrupt is currently in
service because it won't be Acked.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
xen/arch/x86/hvm/vmx/vvmx.c

index 1b8461ba309773358e9c6f7b3179204f4f7a85c1..1753005c91f2540c03933c9ca157e2621315b4e6 100644 (file)
@@ -1383,7 +1383,7 @@ static void nvmx_update_apicv(struct vcpu *v)
 {
     struct nestedvmx *nvmx = &vcpu_2_nvmx(v);
     unsigned long reason = get_vvmcs(v, VM_EXIT_REASON);
-    uint32_t intr_info = nvmx->intr.intr_info;
+    unsigned long intr_info = get_vvmcs(v, VM_EXIT_INTR_INFO);
 
     if ( reason == EXIT_REASON_EXTERNAL_INTERRUPT &&
          nvmx->intr.source == hvm_intsrc_lapic &&